<route lang="json5" type="page">
{
  layout: 'default',
  style: {
    navigationBarTitleText: '远程补币',
  },
}
</route>

<template>
  <view style="height: 100vh; padding: 30rpx; background-color: white">
    <wd-text text="远程补币" bold></wd-text>
    <wd-gap bg-color="#FFFFFF"></wd-gap>

    <wd-cell title="订单号" vertical>
      <wd-input v-model="orderNo" />
    </wd-cell>

    <view class="mt-3">
      <wd-button type="primary" block @click="buyGameCoin">确认补币</wd-button>
    </view>
  </view>
</template>

<script lang="ts" setup>
import { httpPost } from '@/utils/http'

const orderNo = ref('')
const buyGameCoin = async () => {
  const systemInfo = uni.getSystemInfoSync()

  try {
    const res = await httpPost('/api/app/order/order/manualAddByOrderNo', {
      orderNo: orderNo.value,
    })

    uni.showToast({ title: '补币成功' })
  } catch (error) {
    uni.showToast({ title: '补币失败' })
  }
}
</script>

<style lang="scss" scoped>
:deep(.wd-radio) {
  width: 50% !important;
}
</style>
